﻿using System;
using System.Collections.Generic;
using System.Text;
using Syberia.Metacode;
using System.Reflection;

namespace Syberia.Client.Extensions.Metacode
{
    class ReflectedMethodList:ExplorableObject
    {
        MethodInfo[] methods;
        public ReflectedMethodList(MethodInfo[] m)
        {
            methods = m;

        }
        public override string Name
        {
            get
            {
                return "Methods";
            }
        }
        public override IEnumerable<ExplorableObject> SubObjects
        {
            get
            {
                foreach (MethodInfo mi in methods)
                {
                    //TODO: make callable methods
                    yield return new FinalExplorableObject(mi.Name, "Method call is not supported now");
                }
            }
        }
    }
}
